#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "usbreceive.h"
#include"trctrl.h"
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    float frq=2.0000;
    unsigned char i=0;
    ui->setupUi(this);
    plainTextEdit = ui->centralWidget->findChild<QPlainTextEdit*>("plainTextEdit");
     TRCtrl usbctrl;
     usbctrl.usbOpen();
     usbctrl.newHF_ModelCtrl(3);//闭环
     usbctrl.Stop();
     usbctrl.ResetFIFO();
     for(i=0;i<1800;i++)
     {
     usbctrl. SetFreq(frq);//ws:更新频率
     usbctrl.SetAmp(0);
     usbctrl.Start();
     frq=frq+0.001*i;
     }
     //QDateTime dataTime=QdateTime::currentDateTime();
      // plainTextEdit->insertPlainText(QString::number(dataTime, 10));
      // plainTextEdit->insertPlainText(QString::number(usbctrl.m_pUsbDevice->ProductID, 16));

}

MainWindow::~MainWindow()
{
    delete ui;
}
